home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / wla_020_3.0 / examples / linker_test / test.s < prev   
Text File  |  2000-02-28  |  1KB  |  51 lines

  1.  
  2. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  3. ; a small example showing the wla syntax
  4. ; this little program flashes the background colour
  5. ; written by ville helin <vhelin@cc.hut.fi> in 1998-2000
  6. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  7.  
  8. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  9. ; includes
  10. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  11.  
  12. .INCLUDE "defines.i"
  13. .INCDIR  "../include/"
  14. .INCLUDE "cgb_hardware.i"
  15. .INCLUDE "nintendo_logo.i"
  16.  
  17. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  18. ; main
  19. ;»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
  20.  
  21. .BANK = 0
  22. .ORG = $100
  23.  
  24.     JP    MAIN
  25.  
  26. .BANK = 0
  27. .ORG = $150
  28.  
  29. .SECTION "INIT" FREE
  30.  
  31. MAIN:    DI
  32.     CALL    SUM
  33.     LD    SP, $FFFE
  34.     SUB    A
  35.     LD    ($FF00+R_IE), A        ;no interrupts at all.
  36.  
  37.     LD    A, 144
  38.     LD    ($FF00+R_WY), A        ;window y.
  39.  
  40.     LD    A, %10000001
  41.     LD    ($FF00+R_LCDC), A    ;lcd control.
  42.  
  43.     SUB    A
  44.  
  45. _LOOP:    LD    ($FF00+R_BGP), A    ;background palette.
  46.     INC    A
  47.  
  48.     JP    _LOOP
  49.  
  50. .ENDS
  51.